package com.kongxx.struts2study.common.filter;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class MyFilter implements Filter{
	 
	public void init(FilterConfig filterConfig) throws ServletException {
		
	}

	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		System.out.println("---");
		try {
			chain.doFilter(request, response);
		} catch(Throwable ex) {
			ex.printStackTrace();
		}
		System.out.println("===");
	}

	public void destroy() {
		
	}

}
